package com.carmeth.geo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class Inicio extends Activity {
	/** Called when the activity is first created. */
	private final String CLASS = this.getClass().getSimpleName();

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		((Button) findViewById(R.id.btnSearch))
				.setOnClickListener(doRequestHandler);
	}

	private OnClickListener doRequestHandler = new OnClickListener() {
		@Override
		public void onClick(View arg0) {
			EditText et = (EditText) findViewById(R.id.searchState);

			String busqueda = et.getText().toString();

			Log.d(CLASS, busqueda);

			Intent mi = new Intent(getApplicationContext(), ListadoCasas.class);
			// mi.putExtra("noticia", noticias.get(position));
			startActivity(mi);
		}
	};
}